using System.Text;

namespace Boco.Digg.Service
{
	public class StatusBase : IStoryStatus
	{
		private IArguments _arguments;
		protected In _in;

		public StatusBase(IArguments arguments)
		{
			_arguments = arguments;
		}

		virtual public In In
		{
			get
			{
				_in = new In(_arguments);
				return _in;
			}
		}

		virtual public IArguments With
		{
			get { return _arguments; }
		}

		protected virtual string StatusString { get{ return string.Empty;} }

		public override string ToString()
		{
			StringBuilder builder = new StringBuilder();

			if (_in != null)
				builder.Append(_in.ToString());

			builder.Append(StatusString);

			return builder.ToString();
		}
	}
}